<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
	<title>封条管理及验证系统--业务单管理</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<LINK href="<%=request.getContextPath()%>/css/cssCn.css" type="text/css" rel="stylesheet">
<%@ include file="/comm.jsp"%>
<script language="javascript">
	$(document).ready(function() {
		$("#menu_1").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_1").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_2").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_2").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_3").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_3").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_4").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_4").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		$("#menu_5").mouseover(function() {
			$(this).css("background","#FFFFFF");
		});
		$("#menu_5").mouseout(function() {
			$(this).css("background","#EAF0FB");
		});
		
		$("#menu_1").click(function() {
			$("#hdfStatus").val("1");
			$('#busiInfo_list').submit(); 
		});
		$("#menu_2").click(function() {
			$("#hdfStatus").val("2");
			$('#busiInfo_list').submit(); 
		});
		$("#menu_3").click(function() {
			$("#hdfStatus").val("3");
			$('#busiInfo_list').submit(); 
		});
		$("#menu_4").click(function() {
			$("#hdfStatus").val("4");
			$('#busiInfo_list').submit(); 
		});
		$("#menu_5").click(function() {
			$("#hdfStatus").val("5");
			$('#busiInfo_list').submit(); 
		});
	});
</script>

<style type="text/css">
	

<style type="text/css">
<!--
fieldset {
    padding:10px;
    margin:10px;
    width:270px;
    color:#333; 
} 
legend {
    color:#06c;
    font-weight:800; 
} 

.menubar {width:100px; cursor:hand;}
	-->
</style>
	<body>
	<s:form name="formpage" action="busiInfo_list" namespace="/seal">
		<div align="center">
  		<%@ include file="/messages.jsp"%>
			<fieldset>
				<legend>
					查询条件
				</legend>
				<table align="center" width="800px" border="0">
					<tr>
						<td align="right">
							日期：
						</td>
						<td  width="220px">
						<input id="dStartdate" name="busiInfoDto.fromDate" 
						value='<s:date name="#request.busiInfoDto.fromDate" format="yyyy-MM-dd" />'
						size="13" class="Wdate" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'dEnddate\')}'})"/> 
						至<input id="dEnddate" name="busiInfoDto.toDate" 
						 value='<s:date name="#request.busiInfoDto.toDate" format="yyyy-MM-dd" />' 
						size="13" class="Wdate" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'dStartdate\')}'})"/>
						</td>
						<td align="right">
							封条号码：
						</td>
						<td>
							<input name="busiInfoDto.seqId" value="${busiInfoDto.seqId}"
							 type="text" maxlength="20"
								size="15" onkeydown="focusNext('placeNo')" />
						</td>
						<td align="center">
							
						</td>
					</tr>
					<tr>
						<td align="right">
							账户代码：
						</td>
						<td>
							<input name="busiInfoDto.userId" value="${busiInfoDto.userId}"
							 type="text" maxlength="20"
								size="15"  onkeydown="focusNext('seqId')" />
						</td>
						<td align="right">
							柜号/车牌号：
						</td>
						<td>
							<input name="busiInfoDto.carrierNo" type="text" maxlength="20" size="15" value="" />
						</td>
						<td align="center">
							<input type="submit" class="button" id="ok" name="ok" value="查 询" />
							<input type="reset" class="button" id="resets" value="重 置" />
						</td>
					</tr>
				</table>
			</fieldset>
			</div>

			<table border="0" cellpadding="0" cellspacing="1" class="tb_input" id="tblone1">
				<tr class="list_tr_item">
					<td id="menu_1" class="td_title menubar">全部业务</td>
					<td id="menu_2" class="td_title menubar">进行中的</td>
					<td id="menu_3" class="td_title menubar">途中异常</td>
					<td id="menu_4" class="td_title menubar">完成的</td>
					<td id="menu_5" class="td_title menubar">中途开封</td>
					<td id="menu_5" class="td_title">&nbsp;</td>
					<s:hidden id="hdfStatus" name="busiInfoDto.status" value="1" />
				</tr>
			</table>
			
			<div id="divTab1">
            <table border="0" cellpadding="5" cellspacing="1" class="tb_datalist">
			 <tr align="center" height="28px" class="tr_title">
				<td>
					<b>业务单号</b>
				</td>
				<td>
					<b>创建时间</b>
				</td>
				<td>
					<b>状态</b>
				</td>
				<td>
					<b>类型</b>
				</td>
				<td>
					<b>途中异常</b>
				</td>
				<td>
					<b>收货方账户代码</b>
				</td>
				<td>
					<b>集装箱/车牌号码</b>
				</td>
				<td>
					<b>当前封条编号</b>
				</td>
				<td>
					<b>货物信息</b>
				</td>
				<td>
					<b>操作</b>
				</td>
			</tr>
			<s:iterator id="sa" value="#request.busilist">
				<tr class="list_tr_item"
						onMouseOver="javascript:this.className='tr_selected';"
						onMouseOut="javascript:this.className='tr_even';">
					<td>
						<a
							href="<s:url action="busiInfo_editPage"><s:param name="id">
							<s:property value="#sa.busiNo"/></s:param>
							<s:param name="op">0</s:param>
							</s:url>"><s:property value="#sa.busiNo" />
						</a>
					</td>
					<td>
						<s:date name="#sa.createDate" format="yyyy-MM-dd HH:mm"/>	
					</td>
					<td>
						<s:property value="showStatus(#sa)" /> 
					</td>
					<td>
						<s:property value="showType(#sa)" /> 
					</td>
					<td>
						<s:property value="showError(#sa)" />
					</td>
					<td>
						<s:property value="#sa.recvUserid" />
					</td>
					<td>
						<s:property value="#sa.carrierNo" />
					</td>
					<td>
						<s:property value="#sa.curSeqid" />
					</td>
					<td>
						<s:property value="#sa.goodsInfo" />
					</td>
					<td>
						<!-- 20-代收申请 21-代收回复 -->
						<s:if test="testEnsealFlag(#sa)">
						<a
							href="<s:url action="busiInfo_editPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="op">1</s:param>
							</s:url>">
							加封
						</a>
						</s:if>
						<s:if test="testCloseFlag(#sa)">
							<a href="<s:url action="busiInfo_editPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							<s:param name="op">2</s:param>
							</s:url>">
								<s:if test="#sa.sendUserid==#request.userId">
									关闭业务单
								</s:if>
								<s:else>
									结束业务单
								</s:else> 
							</a>
						</s:if>
						<s:if test="testAgentFlag(#sa)">
						<a
							href="<s:url action="busiInfo_applyPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							</s:url>">
						代收申请
						</a>
						</s:if>
						<s:if test="testAgentReplyFlag(#sa)">
						<a
							href="<s:url action="busiInfo_replyPage"><s:param name="id"><s:property value="#sa.busiNo"/></s:param>
							</s:url>">
						代收审核
						</a>
						</s:if>
					</td>
				</tr>
			</s:iterator>
		</table>
		</div>
		<s:property value="#request.allowpage" escape="false" />
		</s:form>
	</body>
</html>
